<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "user_diy_pos".
 *
 * @property integer $id
 * @property integer $user_diy_id
 * @property integer $pos_id
 * @property integer $img_id
 * @property integer $item_id
 */
class UserDiyPos extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_diy_pos';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_diy_id', 'pos_id', 'img_id', 'item_id'], 'integer'],
            [['user_diy_id', 'pos_id'], 'unique', 'targetAttribute' => ['user_diy_id', 'pos_id'], 'message' => 'The combination of User Diy ID and Pos ID has already been taken.']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_diy_id' => 'User Diy ID',
            'pos_id' => 'Pos ID',
            'img_id' => 'Img ID',
            'item_id' => 'Item ID',
        ];
    }
}
